package com.softeem.work.w1;

/**
 * 程序员类
 */
public class Programmer{
    private int id;
    private String name;
    private double salary;

    public Programmer() {
    }

    public Programmer(int id, String name, double salary) {
        this.id = id;
        this.name = name;
        this.salary = salary;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }

    @Override
    public String toString() {
        return "Programmer{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", salary=" + salary +
                '}';
    }

    public void work(int id, String name, double salary){
        System.out.println(id + " === " + name + " === " + salary );
    }

    public void work(Programmer programmer){
        System.out.println("工号:" + programmer.getId());
        System.out.println("姓名:" + programmer.getName());
        System.out.println("工资:" + programmer.getSalary());
    }
}
